<{include file="header.html"}>

<script type="text/javascript">

	function validate()
	{
		var name = document.getElementById('NAME');
		var email = document.getElementById('EMAIL');
        var comment = document.getElementById('COMMENT');
        var pos = document.getElementById('POS');
		// checking TITLE
		if(isEmptyTextBox(name, '<{$smarty.const._LB_NAME_IS_EMPTY|utf8_escape_js}>'))
			return false;

		if(!isValidLengthTextBox(name, <{$smarty.const.MAX_LENGTH_TITLE}>, '<{$smarty.const._LB_NAME_IS_TOO_LONG|utf8_escape_js}>')){
            return false;
        }

		// checking SHORT_CONTENT
        if(isEmptyTextBox(email, '<{$smarty.const._LB_EMAIL_IS_EMPTY|utf8_escape_js}>'))
			return false;

        // checking LONG_CONTENT
		if(isInvalidIntTextBox(pos, '<{$smarty.const._MSG_POSITION_IS_INVALID|utf8_escape_js}>'))
			return false;
        
		// checking LONG_CONTENT
		if(isEmptyTextBox(comment, '<{$smarty.const._MSG_LONG_CONTENT_IS_EMPTY|utf8_escape_js}>'))
			return false;
        
		document.user_form.submit();
	}



</script>

		<div class="box_two_third">
			<div class="box_head"><{$smarty.const._LB_PRESS_MANAGEMENT|utf8_escape_html}></div>
			<div class="box_content">
				<form enctype="multipart/form-data" action="<{$smarty.server.REQUEST_URI}>" method="post" name="user_form">
				<input type="hidden" id="ID" value="<{$testimonial->ID}>"/>
				<input type="hidden" id="act" name="act" value="<{$smarty.const.ACT_VALID_EDIT}>"/>
				<table>
                    <tr>
						<td ><{$smarty.const._LB_NAME|utf8_escape_html}>&nbsp;:&nbsp;<{$smarty.const._LB_REQUIRE_FIELD}></td>
						<td colspan="3"><input name="NAME" id="NAME" type="text" value="<{$testimonial->NAME|utf8_escape_html}>" /></td>
					</tr>
                    <tr>
						<td ><{$smarty.const._LB_EMAIL|utf8_escape_html}>&nbsp;:&nbsp;<{$smarty.const._LB_REQUIRE_FIELD}></td>
						<td colspan="3"><input name="EMAIL" id="EMAIL" type="text" value="<{$testimonial->EMAIL|utf8_escape_html}>" /></td>
                    </tr>
                    <tr>
						<td ><{$smarty.const._LB_POSITION|utf8_escape_html}>&nbsp;:&nbsp;<{$smarty.const._LB_REQUIRE_FIELD}></td>
						<td colspan="3"><input name="POS" id="POS" type="text" value="<{$testimonial->POS|utf8_escape_html}>" /></td>
                    </tr>
					<tr>
						<td><{$smarty.const._LB_IMAGE|utf8_escape_html}>: </td>
						<td>
							<{if $testimonial->IMAGE}>
								<img style="display: block; opacity: 1; cursor: pointer;" src="<{$smarty.const.IMAGE_URL}>/thumb<{$testimonial->IMAGE}>">
								<br/>
							<{/if}>
							<input type="file" name="IMAGE" id="IMAGE" size="60" >
						</td>
					</tr>
					<tr>
						<td ><{$smarty.const._LB_COMMENT|utf8_escape_html}>&nbsp;:&nbsp;<{$smarty.const._LB_REQUIRE_FIELD}></td>
						<td colspan="3"><textarea name="COMMENT" id="COMMENT" cols="60" rows="6" ><{$testimonial->COMMENT}></textarea></td>
					</tr>
                    <tr>
						<td ><{$smarty.const._LB_STATUS|utf8_escape_html}>&nbsp;:&nbsp;</td>
						<td colspan="3">
                            <select id="STATUS" name="STATUS">
                                <option value="0" <{if $testimonial->STATUS == 0}>selected="selected"<{/if}>><{$smarty.const._LB_WAITING_FOR_APPROVE|utf8_escape_html}></option>
                                <option value="1" <{if $testimonial->STATUS == 1}>selected="selected"<{/if}>><{$smarty.const._LB_APPROVED|utf8_escape_html}></option>
                                <option value="2" <{if $testimonial->STATUS == 2}>selected="selected"<{/if}>><{$smarty.const._LB_REJECTED|utf8_escape_html}></option>
                            </select>
                        </td>
					</tr>
					<tr>
						  <td class="submit" colspan="4" style="padding-top:10px"><br />
								<a class="tribullet" href="<{$backlink}>"><{$smarty.const._LB_BACK}></a>
								<a class="tribullet" href="#" onclick="validate()"><{$smarty.const._LB_VALIDATE}></a>
							</td>
						</tr>

				</table>
				</form>

			</div>
		</div>
<{include file="footer.html"}>
